home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / grafik / raytracing / rayshade-4.0.6.3 / libray / libcommon / ray.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-09  |  1.5 KB  |  57 lines

  1. /*
  2.  * ray.h
  3.  *
  4.  * Copyright (C) 1989, 1991, Craig E. Kolb
  5.  * All rights reserved.
  6.  *
  7.  * This software may be freely copied, modified, and redistributed
  8.  * provided that this copyright notice is preserved on all copies.
  9.  *
  10.  * You may not distribute this software, in whole or in part, as part of
  11.  * any commercial product without the express consent of the authors.
  12.  *
  13.  * There is no warranty or other guarantee of fitness of this software
  14.  * for any purpose.  It is provided solely "as is".
  15.  *
  16.  * ray.h,v 4.1 1994/08/09 07:54:56 explorer Exp
  17.  *
  18.  * ray.h,v
  19.  * Revision 4.1  1994/08/09  07:54:56  explorer
  20.  * Bump version to 4.1
  21.  *
  22.  * Revision 1.1.1.1  1994/08/08  04:52:01  explorer
  23.  * Initial import.  This is a prerelease of 4.0.6enh3, or 4.1 possibly.
  24.  *
  25.  * Revision 4.0  91/07/17  14:31:08  kolb
  26.  * Initial version.
  27.  * 
  28.  */
  29. #ifndef RAY_H
  30. #define RAY_H
  31. /* 
  32.  * Ray types 
  33.  */
  34. #define EYE_RAY         1
  35. #define SHADOW_RAY      2
  36. #define REFLECT_RAY     3
  37. #define REFRACT_RAY     4
  38.  
  39. /* 
  40.  * Ray
  41.  */
  42. typedef struct Ray {
  43.     Vector    pos,            /* Origin */
  44.         dir;            /* Direction */
  45.     int     depth,            /* depth in ray tree */
  46.         sample;            /* current sample # */
  47.     Float    time;
  48.         Vector  viewpoint;              /* ray viewpoint */
  49.         int     type;                   /* EYE_RAY, SHADOW_RAY, ... */
  50.         Float   viewdist,               /* for pixelsize computation */
  51.             width,
  52.                 stretch;                /* amount the ray is stretched by transformations */
  53.  
  54.     struct Medium *media;        /* Medium ray is passing through */
  55. } Ray;
  56. #endif
  57.